package com.qf.controller;

import com.qf.dto.DtsSerachDto;
import com.qf.service.DtsAccountTraceService;
import com.qf.util.ResponseUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * projectName: shop-manage
 *
 * @author: 元
 * time: 2021/9/15 0015 17:09
 * description:佣金管理(账户流水表)
 */
@RestController
@CrossOrigin("*")
@RequestMapping("brokerage")
public class BrokerageController {

    public static final Logger logger = LoggerFactory.getLogger(BrokerageController.class);

    @Autowired
    private DtsAccountTraceService accountTraceService;

    //佣金列表展示
    @RequestMapping("list")
    public Object list(DtsSerachDto serachDto){
        logger.debug("[佣金管理]佣金列表参数为：{}",serachDto);
        Map data = accountTraceService.findBrokerageBy(serachDto);
        logger.debug("[佣金列表]分页查询的数据为{}",data);
        return ResponseUtil.ok(data);

    }


    //佣金审批
    @RequestMapping("approve")
    public Object approve(){
        return null;
    }



}
